package com.pajk.user.api;

import java.util.List;

import com.pajk.user.model.CreditRule;

public interface CreditRuleService {

    /**
     * 添加一条积分规则,actionCode主键，唯一标识一条积分规则
     * @param creditRule
     */
    public void insertCreditRule(CreditRule creditRule);

    /**
     * 返回所有的creditRule
     * @return
     */
    public List<CreditRule> getCreditRule();
    
    /**
     * 通过actionCode获取相应的积分规则
     * @param actionCode
     * @return
     */
    public CreditRule getCreditRuleByActionCode(String actionCode);

    /**
     * 根据actionCode 更新积分规则
     * @param creditRule
     * @return
     */
    public int updateCreditRuleByActionCode(CreditRule creditRule);

    /**
     * 根据actionCode 删除一条积分规则
     * @param actionCode
     * @return
     */
    public int deleteCreditRuleByActionCode(String actionCode);

}
